Matlab for循環subplot畫圖加標題
x=1:10; for i = 1:4 y=i*x; subplot(2,2,i) plot(x,y) title(sprintf('y=%i x\n ...
x=1:10; for i = 1:4 y=i*x; subplot(2,2,i) plot(x,y) title(sprintf('y=%i x\n ...
x = 1:10; for i = 1:4 y = i*x; h = plot(x,y); hold on end legend(h([1,2,3,4]),'y1','y ...